Class symantec.itools.awt.RadioButtonGroupPanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.RadioButtonGroupPanel

Object
   |
   +----Component
           |
           +----Container
                   |
                   +----Panel
                           |
                           +----BorderPanel
                                   |
                                   +----symantec.itools.awt.RadioButtonGroupPanel

public class RadioButtonGroupPanel
extends BorderPanel
implements ItemSelectable
Creates an rectangular panel area that automatically groups the RadioButtons that it contains.

All the RadioButtons within the RadioButtonGroupPanel act together. Only one of the RadioButtons can be "on" at a time.

Version:
1.1, August 22, 1997
Author:
Symantec

Variable Index

 o errors
Error strings.
 o group
The Checkbox group for the radio buttons.
 o isAdded
is the component added to a container hierarchy?
 o itemListener
Listener(s) that get notified when an ItemEvent is generated.
 o rbList
Vector of Checkboxes added to the panel.
 o tempSelectionIndex
Internal use.

Constructor Index

 o symantec.itools.awt.RadioButtonGroupPanel()
Constructs a RadioButtonGroupPanel.

Method Index

 o addImpl(Component, Object, int)
Adds the specified component to this container at the specified index.
 o addItemListener(ItemListener)
Adds the specified item listener to receive item events from this component.
 o addNotify()
Tells this component that it has been added to a container.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener for all event changes.
 o addSelectedRadioButtonIndexListener(PropertyChangeListener)
Adds a listener for the SelectedRadioButtonIndex property changes.
 o addSelectedRadioButtonIndexListener(VetoableChangeListener)
Adds a vetoable listener for the SelectedRadioButtonIndex property changes.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a vetoable listener for all event changes.
 o getSelectedObjects()
Returns the selected items or null if no items are selected.
 o getSelectedRadioButton()
Gets the current choice.
 o getSelectedRadioButtonIndex()
Gets the index of the current choice.
 o isValidSelectedRadioButtonIndex(int)
Is the given index value valid.
 o moveIntoGroup(Component)
Internal helper method.
 o remove(int)
Removes the component at the specified index from this container.
 o removeAll()
Removes all the components from this container.
 o removeItemListener(ItemListener)
Removes the specified Item listener so it no longer receives Item events from this component.
 o removeNotify()
Tells this component that it is being removed from a container.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener for all event changes.
 o removeSelectedRadioButtonIndexListener(PropertyChangeListener)
Removes a listener for the SelectedRadioButtonIndex property changes.
 o removeSelectedRadioButtonIndexListener(VetoableChangeListener)
Removes a vetoable listener for the SelectedRadioButtonIndex property changes.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable listener for all event changes.
 o setSelectedRadioButton(Checkbox)
Sets the current choice to the specified RadioButton.
 o setSelectedRadioButtonIndex(int)
Sets the current choice to the specified RadioButton.
 o sourceItemEvent(Checkbox)
Fires an item event to the listeners.
 o toString()
Returns the String representation of this RadioButtonGroup's values.

Variables

 o errors
protected transient java.util.ResourceBundle errors
Error strings.

 o group
protected java.awt.CheckboxGroup group
The Checkbox group for the radio buttons.

 o isAdded
protected boolean isAdded
is the component added to a container hierarchy?

 o itemListener
protected java.awt.event.ItemListener itemListener
Listener(s) that get notified when an ItemEvent is generated.

 o rbList
protected java.util.Vector rbList
Vector of Checkboxes added to the panel. Used to set selected RadioButton by index.

 o tempSelectionIndex
protected int tempSelectionIndex
Internal use. Remembers the requested selected index so that setSelectedIndex may be called before the appropriate radio button has been added.

Constructors

 o RadioButtonGroupPanel
public RadioButtonGroupPanel()
Constructs a RadioButtonGroupPanel.

Methods

 o addImpl
protected void addImpl(Component component,
                       Object constraints,
                       int index)
Adds the specified component to this container at the specified index.

Overrides:
addImpl in class BorderPanel
 o addItemListener
public synchronized void addItemListener(ItemListener l)
Adds the specified item listener to receive item events from this component.

Parameters:
l - the item listener
See Also:
removeItemListener
 o addNotify
public synchronized void addNotify()
Tells this component that it has been added to a container. This is a standard Java AWT method which gets called by the AWT when this component is added to a container. Typically, it is used to create this component's peer. It has been overridden here to hook-up event listeners.

Overrides:
addNotify in class BorderPanel
See Also:
removeNotify
 o addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for all event changes.

Parameters:
listener - the listener to add.
Overrides:
addPropertyChangeListener in class BorderPanel
See Also:
removePropertyChangeListener
 o addSelectedRadioButtonIndexListener
public synchronized void addSelectedRadioButtonIndexListener(PropertyChangeListener listener)
Adds a listener for the SelectedRadioButtonIndex property changes.

Parameters:
listener - the listener to add.
See Also:
removeSelectedRadioButtonIndexListener(java.beans.PropertyChangeListener)
 o addSelectedRadioButtonIndexListener
public synchronized void addSelectedRadioButtonIndexListener(VetoableChangeListener listener)
Adds a vetoable listener for the SelectedRadioButtonIndex property changes.

Parameters:
listener - the listener to add.
See Also:
removeSelectedRadioButtonIndexListener(java.beans.VetoableChangeListener)
 o addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
Adds a vetoable listener for all event changes.

Parameters:
listener - the listener to add.
Overrides:
addVetoableChangeListener in class BorderPanel
See Also:
removeVetoableChangeListener
 o getSelectedObjects
public java.lang.Object[] getSelectedObjects()
Returns the selected items or null if no items are selected.

 o getSelectedRadioButton
public java.awt.Checkbox getSelectedRadioButton()
Gets the current choice.

 o getSelectedRadioButtonIndex
public int getSelectedRadioButtonIndex()
Gets the index of the current choice.

Returns:
the index of the selected RadioButton. -1 if no selection.
See Also:
setSelectedRadioButtonIndex
 o isValidSelectedRadioButtonIndex
protected boolean isValidSelectedRadioButtonIndex(int index)
Is the given index value valid.

Parameters:
index - the given index to test
Returns:
true if the given index is acceptable, false if not. To be valid it has to be within the limits of the rbList:
 o moveIntoGroup
protected void moveIntoGroup(Component component)
Internal helper method. Adds the given Checkbox into this panel's CheckboxGroup without changing its "selected" state.

Parameters:
component - the Checkbox to add to this RadioButtonGroupPanel
 o remove
public void remove(int index)
Removes the component at the specified index from this container.

Parameters:
index - the index of the component to be removed
Overrides:
remove in class BorderPanel
See Also:
add
 o removeAll
public void removeAll()
Removes all the components from this container.

Overrides:
removeAll in class BorderPanel
See Also:
add, remove
 o removeItemListener
public synchronized void removeItemListener(ItemListener l)
Removes the specified Item listener so it no longer receives Item events from this component.

Parameters:
l - the action listener
See Also:
addItemListener
 o removeNotify
public synchronized void removeNotify()
Tells this component that it is being removed from a container. This is a standard Java AWT method which gets called by the AWT when this component is removed from a container. Typically, it is used to destroy the peers of this component and all its subcomponents. It has been overridden here to unhook event listeners.

Overrides:
removeNotify in class BorderPanel
See Also:
addNotify
 o removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener for all event changes.

Parameters:
listener - the listener to remove.
Overrides:
removePropertyChangeListener in class BorderPanel
See Also:
addPropertyChangeListener
 o removeSelectedRadioButtonIndexListener
public synchronized void removeSelectedRadioButtonIndexListener(PropertyChangeListener listener)
Removes a listener for the SelectedRadioButtonIndex property changes.

Parameters:
listener - the listener to remove.
See Also:
addSelectedRadioButtonIndexListener(java.beans.PropertyChangeListener)
 o removeSelectedRadioButtonIndexListener
public synchronized void removeSelectedRadioButtonIndexListener(VetoableChangeListener listener)
Removes a vetoable listener for the SelectedRadioButtonIndex property changes.

Parameters:
listener - the listener to remove.
See Also:
addSelectedRadioButtonIndexListener(java.beans.VetoableChangeListener)
 o removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable listener for all event changes.

Parameters:
listener - the listener to remove.
Overrides:
removeVetoableChangeListener in class BorderPanel
See Also:
addVetoableChangeListener
 o setSelectedRadioButton
public synchronized void setSelectedRadioButton(Checkbox rb) throws PropertyVetoException
Sets the current choice to the specified RadioButton.

Parameters:
rb - the current RadioButton (CheckBox) choice
Throws: PropertyVetoException
if the recipient wishes the property change to be rolled back.
 o setSelectedRadioButtonIndex
public synchronized void setSelectedRadioButtonIndex(int index) throws PropertyVetoException
Sets the current choice to the specified RadioButton.

Parameters:
index - the index of the RadioButton to be the selected.
Throws: PropertyVetoException
if the recipient wishes the property change to be rolled back.
See Also:
getSelectedRadioButtonIndex
 o sourceItemEvent
protected void sourceItemEvent(Checkbox item)
Fires an item event to the listeners.

Parameters:
item - the radio button that changed state
 o toString
public java.lang.String toString()
Returns the String representation of this RadioButtonGroup's values. Convert to String.

Overrides:
toString in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index